package com.suxin.splitter.merger;

import com.suxin.splitter.ResultMerger;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * @author Tang
 * @classname AbstractResultMerger
 * @description [  ]
 * @date 2022/11/8 19:01
 */
public class AbstractResultMerger<R> implements ResultMerger<R> {

    @Override
    public R merge(List<R> rs) {
        if (CollectionUtils.isEmpty(rs)) {
            return defaultValue();
        }
        return null;
    }

    protected R defaultValue() {
        return null;
    }
}
